/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package edu.lnu.ums.service;

import edu.lnu.ums.dal.exception.OldVersionSavingException;
import edu.lnu.ums.entities.core.AbstractProcess;
import edu.lnu.ums.entities.core.UMSObject;
import javax.ejb.Local;
import javax.persistence.EntityManagerFactory;

@Local
public interface ITreeService {

    UMSObject getRoot();

    void changeParent(UMSObject child, UMSObject newParent);

    UMSObject getRoot(UMSObject root);

    void saveUMSObj(UMSObject obj) throws OldVersionSavingException;

    void deleteUMSObj(UMSObject obj);

    void addUMSObj(UMSObject obj);

    UMSObject getById(UMSObject selectedObject, Long id);

    AbstractProcess getProcessByClassAndObject(Class<?> cls, UMSObject obj);

    AbstractProcess saveProcess(AbstractProcess procces) throws OldVersionSavingException;

}
